Show minor edits - Show changes to markup
To effectively use commands, it is vital to know that the commands are sent to objects. These objects are made from a class. Classes dictate what commands can be sent to objects that are made from that class. This document explains all you need to know about classes to perform advanced scripting. Many mappers will probably do just fine by copying others scripts and modifying them, but when you want to do some serious scripting from scratch: You need to know about the classes of MOH. For a complete ( but short ) definition of ALL classes, see the file g_allclasses.html? ( for Allied Assault ) and MOH_GameClasses.html? ( for Spearhead ).
To effectively use commands, it is vital to know that the commands are sent to objects. These objects are made from a class. Classes dictate what commands can be sent to objects that are made from that class. This document explains all you need to know about classes to perform advanced scripting. Many mappers will probably do just fine by copying others scripts and modifying them, but when you want to do some serious scripting from scratch: You need to know about the classes of MOH. For a complete ( but short ) definition of ALL classes, see the file Attach:g_allclasses.html ( for Allied Assault ) and Attach:MOH_GameClasses.html ( for Spearhead ).
All commands are sent to an object that is of a specific class. As an example: all player objects are of the class Player and all script_object's are of the class ScriptSlave?. All the classes are listed in the file g_allclasses.html? ( for Allied Assault ) or MOH_GameClasses.html? ( for Spearhead ).
All commands are sent to an object that is of a specific class. As an example: all player objects are of the class Player and all script_object's are of the class ScriptSlave?. All the classes are listed in the file Attach:g_allclasses.html ( for Allied Assault ) or Attach:MOH_GameClasses.html ( for Spearhead ).
This is the inheritance chain for the Player class. So? What about it? Well this means a lot of things, but the only thing you need to know is that the '->' arrow is interpreted as Player inherits from Sentient. So? Inherits what? Its commands! This means that all the commands from the classes it inherits from also work for the inheriting classes. This also means that via this inheritance chain, Player also inherits all commands from Class, Listener, SimpleEntity?, Entity, Animate and Sentient. So remember when reading the g_allclasses.html or MOH_GameClasses.html files: a class supports all the commands stated PLUS all the commands stated for the classes it inherits from ( this adds up to a lot of commands ).
This is the inheritance chain for the Player class. So? What about it? Well this means a lot of things, but the only thing you need to know is that the '->' arrow is interpreted as Player inherits from Sentient. So? Inherits what? Its commands! This means that all the commands from the classes it inherits from also work for the inheriting classes. This also means that via this inheritance chain, Player also inherits all commands from Class, Listener, SimpleEntity?, Entity, Animate and Sentient. So remember when reading the Attach:g_allclasses.html or Attach:MOH_GameClasses.html files: a class supports all the commands stated PLUS all the commands stated for the classes it inherits from ( this adds up to a lot of commands ).
(:toc:)
To effectively use commands, it is vital to know that the commands are sent to objects. These objects are made from a class. Classes dictate what commands can be sent to objects that are made from that class. This document explains all you need to know about classes to perform advanced scripting. Many mappers will probably do just fine by copying others scripts and modifying them, but when you want to do some serious scripting from scratch: You need to know about the classes of MOH. For a complete ( but short ) definition of ALL classes, see the file g_allclasses.html? ( for Allied Assault ) and MOH_GameClasses.html? ( for Spearhead ).
All commands are sent to an object that is of a specific class. As an example: all player objects are of the class Player and all script_object's are of the class ScriptSlave?. All the classes are listed in the file g_allclasses.html? ( for Allied Assault ) or MOH_GameClasses.html? ( for Spearhead ).
Classes exist in an inheritance relationship. This works like this:
Lets use the Player class as an example:
Player -> Sentient -> Animate -> Entity -> SimpleEntity? -> Listener -> Class
This is the inheritance chain for the Player class. So? What about it? Well this means a lot of things, but the only thing you need to know is that the '->' arrow is interpreted as Player inherits from Sentient. So? Inherits what? Its commands! This means that all the commands from the classes it inherits from also work for the inheriting classes. This also means that via this inheritance chain, Player also inherits all commands from Class, Listener, SimpleEntity?, Entity, Animate and Sentient. So remember when reading the g_allclasses.html or MOH_GameClasses.html files: a class supports all the commands stated PLUS all the commands stated for the classes it inherits from ( this adds up to a lot of commands ).
Here is the complete class inheritance chain for Medal of Honor:
Classes with a '*' after them, are only found in Medal of Honor : Spearhead
It is read like this: A VehicleTurretGun? is a TurretGun? ( inherits all commands from TurretGun? ), a TurretGun? is a Weapon, a Weapon is an Item, an Item is a Trigger, a Trigger is an Animate, an Animate is an Entity, an Entity is a SimpleEntity?, a SimpleEntity? is a Listener, a Listener is a Class... and here's the cool thing: a VehicleTurretGun? is ( because of inheritance ) a Class ( and all things between VehicleTurretGun? and Class as well ).